package ee.siimoliver.chat.utils;

import java.awt.Font;

import javax.swing.ImageIcon;

public interface Const {

	public static final String IMAGE_ROOT = "images/";
	public static final String LOADING_IMAGE = "images/bar";
	public static final String PROPERTIES_FILE = "files/application.properties"; 
	public static final String PROPERTIES_FILE_EXT = ".properties"; 
	public static final String FILE_ROOT = "files/";
	public static final String USERS_TABLE_FILE = "files/%s_usersTable.json";
	public static final String IMAGE_EXT = ".png";
	public static final String LBL_CHATTING = "Chatting with: ";
	public static final String LBL_SEND = "Send";
	public static final String LBL_ADD = "Add";
	public static final String LBL_NEW = "Search new";
	public static final String LBL_SEARCH_CHATMATE = "Search new chatmate";
	public static final String LBL_REFRESH_ALL = "Refresh all";
	public static final String LBL_CHAT_APPLICATION = "Chat";
	public static final String LBL_FILE_MENU = " File ";
	public static final String LBL_NEW_CHAT = " New chat";
	public static final String LBL_EXIT = " Exit";
	public static final String LBL_PROPERTIES = " Properties";
	public static final String LBL_USERNAME = "Username";
	public static final String LBL_PORT = "Port";
	public static final String LBL_SAVE = "Save";
	public static final String LBL_CANCEL = "Cancel";
	public static final String LBL_SEARCH = "Search";
	public static final String LBL_USERS_INFO = "Found users:";
	public static final String LBL_ENTER_NAME = "Enter name:";
	public static final String LBL_UNREACHABLE = "(Unreachable)";
	public static final String CHAT_OUPUT_FORMAT = "[%s] > %s\n";
	public static final String JSON_WRITE_FORMAT = "[\"%s\",\"%s\"]";
	
	public static final String TXT_ERROR = "Error";
	
	public static final Font INPUTAREA_FONT = new Font("Consolas", 0, 15);
	public static final Font CHATAREA_FONT = new Font("Consolas", 0, 14);
	
	public static final ImageIcon ICON_ADD = new ImageIcon(IMAGE_ROOT + "ic_input_add" + IMAGE_EXT);
	public static final ImageIcon ICON_SEARCH = new ImageIcon(IMAGE_ROOT + "ic_btn_search_big" + IMAGE_EXT);
	
	public static final String PROP_USERNAME = "user.name";
	public static final String PROP_PORT = "application.port";
	
	public static final char START_BRACKET = '[';
	public static final char END_BRACKET = ']';
	public static final char QUOTE = '"';
	public static final char EQUALS = '=';
	public static final char AMPERSAND = '&';
	public static final char QUESTION_MARK = '?';
	public static final char COLON = ':';
	public static final char SEMICOLON = ';';
	public static final char COMMA = ',';
	public static final String NBSP = "&nbsp;";
	public static final String NWLN = "&nwln;";
	
	public static final String REQUEST_BODY = "body";

	public static final String[] PROPERTIES_FILE_CONTENT = new String[]{PROP_USERNAME + "=", PROP_PORT + "="};
	
	public static final String DEFAULT_USER = "[\"default\",\"10.10.10.109:8888\"]";
	
	public static int TIMEOUT_IN_MILLIS = 1000;
	public static final int TIMERTASK_TIMEOUT = 3000;
	public static final int TIME_TO_LIVE = 10;
	public static final String HEADER_HTTP_VER = "HTTP/1.0 ";
	public static final String HEADER_SERVER = "Server: Simple java";
	public static final String HEADER_KEY_SENDMESSAGE = "message";
	public static final String HEADER_KEY_MYNAME = "myname";
	public static final String HEADER_KEY_NAME = "name";
	public static final String HEADER_KEY_MYIP = "myip";
	public static final String HEADER_KEY_IP = "ip";
	public static final String HEADER_KEY_TTL = "ttl";
	public static final String HEADER_KEY_OTHER_MATES = "othermates";
	public static final String HEADER_HTTP_PREFIX = "http://";
	public static final String HEADER_KEY_LOCALHOST = "localhost";
	
	public static final String MIME_JSON = "application/json";
	public static final String MIME_HTML = "text/html";
	public static final String UTF8 = "utf-8";
	
	public static final boolean IS_CUSTOM_CODING = false; //false if multiname
	
	//request paths
	public static final String METHOD_ROOT = "/chat/";
	public static final String METHOD_FINDNAME = METHOD_ROOT + "findname";
	public static final String METHOD_SENDNAME = METHOD_ROOT + "sendname";
	public static final String METHOD_ASKNAMES = METHOD_ROOT + "asknames";
	public static final String METHOD_SENDMESSAGE = METHOD_ROOT + "sendmessage";
}
